#
# Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
#
# GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
# Author: Shawn.Tan
# Date: 2025.10.28
#
# History: Initial Version 2025.10.28
#
#
from gpgpu.EnvGPGPU import EnvGPGPU
from gpgpu.GenThreadGPGPU import GenThreadGPGPU
from base.Sequence import Sequence
from DV.gpgpu.trees.instruction_tree import *


class MainSequence(Sequence):

    # Verify we can generate LDR register instructions without preamble
    def generate(self, **kargs):

        for i in range(500):
            instrs_tree = (
                LDST32_All_instructions
                if self.getGlobalState("AppRegisterWidth") == 32
                else LDST_All_instructions
            )
            instr = self.pickWeighted(instrs_tree)
            self.genInstruction(instr, {"NoPreamble": 1})


# Points to the MainSequence defined in this file
MainSequenceClass = MainSequence

# Using GenThreadGPGPU by default, can be overriden with extended classes
GenThreadClass = GenThreadGPGPU

# Using EnvGPGPU by default, can be overriden with extended classes
EnvClass = EnvGPGPU
